import { request } from '@/utils/request'

//获得某个系统参数
export const getParam = function (id) {
    return request.get(`/param/${id}`)
}

//更新系统参数
export const updateParam = function (id, value) {
    return request.put(`/param/${id}?value=${value}`)
}

//分页查找全部系统参数
export const pageParam = function (current, size, name = '') {
    return request.get(`/param/page?current=${current}&size=${size}&name=${name}`)
}

//保存系统参数
export const saveParam = function (entity) {
    return request.post('/param', entity)
}

//删除
export const removeParam = function (id) {
    return request.delete(`/param/${id}`)
}

//获得某个系统参数通过名字
export const getParamByName = function (name) {
    return request.get(`/param?name=${name}`)
}